
#include "../lib_prj/game_utility/attrSync.h"
#include <unordered_map>

using namespace std;



std::unordered_map<AttrTypeUint32, uint32> m_dirtyMap;

void fff331()
{
	SyncArray<AttrTypeUint32, uint32, (int)AttrTypeUint32::ATTR_MAX> a1;
	a1.Init(AttrTypeUint32::HP, m_dirtyMap);
	a1[AttrTypeUint32::HP] = 100;
	uint32 c = a1[AttrTypeUint32::HP];
	UNIT_ASSERT(c == 100);
	
	a1[2] = 100;
	uint32 c2 = a1[2];
	UNIT_ASSERT(c2 == 100);

}

UNITTEST(AttrSync)
{
	fff331();
	UNIT_INFO("run AttrSync");
}


